.class Lcom/estrongs/android/ui/dialog/p$d;
.super Ljava/lang/Object;
.source "CloudFileSharingDialog.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/estrongs/android/ui/dialog/p;->a(Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Ljava/lang/String;

.field final synthetic b:Lcom/estrongs/android/ui/dialog/p;


# direct methods
.method constructor <init>(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    iput-object p2, p0, Lcom/estrongs/android/ui/dialog/p$d;->a:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 9

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2}, Lcom/estrongs/android/ui/dialog/p;->e(Lcom/estrongs/android/ui/dialog/p;)Landroid/app/Activity;

    move-result-object v2

    const v3, 0x7f110279

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2, v0}, Lcom/estrongs/android/ui/dialog/p;->a(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;Z)V

    .line 2
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->a:Ljava/lang/String;

    invoke-static {v1}, Les/j30;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_4

    .line 3
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/p$d;->a:Ljava/lang/String;

    invoke-static {v2, v3}, Lcom/estrongs/android/ui/dialog/p;->a(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    .line 4
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->a:Ljava/lang/String;

    invoke-static {v2}, Lcom/estrongs/android/util/h0;->M1(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 5
    invoke-static {v1}, Lcom/estrongs/fs/impl/pcs/PcsFileSystem;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2
    :try_end_0
    .catch Lcom/estrongs/android/pop/netfs/NetFsException; {:try_start_0 .. :try_end_0} :catch_0

    const-string v3, "http://www.estrongs.com/esshare?s="

    const/16 v4, 0x2d

    const/16 v5, 0x2f

    const/16 v6, 0x5f

    const/16 v7, 0x20

    if-eqz v2, :cond_0

    .line 6
    :try_start_1
    invoke-static {v2, v0}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/String;Z)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v7, v6}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v5, v4}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v2

    .line 7
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v8, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 8
    iget-object v8, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v8, v2}, Lcom/estrongs/android/ui/dialog/p;->b(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    .line 9
    :cond_0
    invoke-static {v1, v0}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/String;Z)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1, v7, v6}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1, v5, v4}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v1

    .line 10
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 11
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2, v1}, Lcom/estrongs/android/ui/dialog/p;->c(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    .line 12
    invoke-static {v1}, Lcom/estrongs/fs/impl/pcs/PcsFileSystem;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_1

    .line 13
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2, v1}, Lcom/estrongs/android/ui/dialog/p;->d(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    goto :goto_0

    .line 14
    :cond_1
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v1, v2}, Lcom/estrongs/android/ui/dialog/p;->d(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    goto :goto_0

    .line 15
    :cond_2
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2, v1}, Lcom/estrongs/android/ui/dialog/p;->c(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    .line 16
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2, v1}, Lcom/estrongs/android/ui/dialog/p;->d(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;)Ljava/lang/String;

    .line 17
    :goto_0
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v2}, Lcom/estrongs/android/ui/dialog/p;->e(Lcom/estrongs/android/ui/dialog/p;)Landroid/app/Activity;

    move-result-object v2

    const v3, 0x7f110072

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Lcom/estrongs/android/ui/dialog/p;->a(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;Z)V

    .line 18
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v1}, Lcom/estrongs/android/ui/dialog/p;->h(Lcom/estrongs/android/ui/dialog/p;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Les/j30;->p(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 19
    invoke-static {}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->a1()Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v1

    .line 20
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v2

    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v3}, Lcom/estrongs/android/ui/dialog/p;->h(Lcom/estrongs/android/ui/dialog/p;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v2

    const-string v3, "public_share_link"

    .line 21
    invoke-interface {v2, v3}, Lcom/estrongs/fs/g;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    if-eqz v2, :cond_3

    .line 22
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_5

    .line 23
    :cond_3
    new-instance v2, Lcom/estrongs/android/ui/dialog/p$d$a;

    invoke-direct {v2, p0, v1}, Lcom/estrongs/android/ui/dialog/p$d$a;-><init>(Lcom/estrongs/android/ui/dialog/p$d;Lcom/estrongs/android/pop/view/FileExplorerActivity;)V

    invoke-virtual {v1, v2}, Lcom/estrongs/android/pop/esclasses/ESActivity;->a(Ljava/lang/Runnable;)V

    goto :goto_1

    .line 24
    :cond_4
    new-instance v1, Lcom/estrongs/android/pop/netfs/NetFsException;

    const-string v2, "Network error"

    const/4 v3, 0x0

    invoke-direct {v1, v2, v3}, Lcom/estrongs/android/pop/netfs/NetFsException;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/netfs/NetFsException$ERROR_CODE;)V

    throw v1
    :try_end_1
    .catch Lcom/estrongs/android/pop/netfs/NetFsException; {:try_start_1 .. :try_end_1} :catch_0

    :catch_0
    move-exception v1

    .line 25
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 26
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v1}, Lcom/estrongs/android/ui/dialog/p;->e(Lcom/estrongs/android/ui/dialog/p;)Landroid/app/Activity;

    move-result-object v2

    const v3, 0x7f11077f

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2, v0}, Lcom/estrongs/android/ui/dialog/p;->a(Lcom/estrongs/android/ui/dialog/p;Ljava/lang/String;Z)V

    .line 27
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/p$d;->b:Lcom/estrongs/android/ui/dialog/p;

    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/p;->e(Lcom/estrongs/android/ui/dialog/p;)Landroid/app/Activity;

    move-result-object v0

    invoke-static {v0, v3}, Lcom/estrongs/android/pop/utils/i;->b(Landroid/content/Context;I)V

    :cond_5
    :goto_1
    return-void
.end method
